import { combineEpics } from 'redux-observable';
import { filter, mapTo, delay } from 'rxjs/operators';
import { BASE_ACTION_2, BASE_ACTION_1 } from './action';
export const testEpic = action$ => action$.pipe(
  filter(action => action.type === BASE_ACTION_2),
  delay(1000),
  mapTo({ type: BASE_ACTION_1, newVal: 'this is new val' })
);

export default combineEpics(testEpic);